home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / System / ReqToolsLib / Source / reqtools / rtchangereqattra.c < prev    next >
Encoding:
C/C++ Source or Header  |  2001-07-02  |  4.5 KB  |  152 lines

  1.  
  2. /*
  3.     (C) 1999 - 2000 AROS - The Amiga Research OS
  4.     $Id: rtchangereqattra.c,v 1.3 2000/11/26 16:53:48 stegerg Exp $
  5.  
  6.     Desc:
  7.     Lang: English
  8. */
  9.  
  10. #include <exec/types.h>
  11. #include <proto/exec.h>
  12. #include <proto/reqtools.h>
  13. #include <proto/intuition.h>
  14. #include <exec/libraries.h>
  15. #include <exec/memory.h>
  16. #include <aros/libcall.h>
  17.  
  18. #include "reqtools_intern.h"
  19.  
  20. /*****************************************************************************
  21.  
  22.     NAME */
  23.  
  24.     AROS_LH2(LONG, rtChangeReqAttrA,
  25.  
  26. /*  SYNOPSIS */
  27.  
  28.     AROS_LHA(APTR, req, A1),
  29.     AROS_LHA(struct TagItem *, taglist, A0),
  30.  
  31. /*  LOCATION */
  32.  
  33.     struct ReqToolsBase *, ReqToolsBase, 8, ReqTools)
  34.  
  35. /*  FUNCTION
  36.     Change requester attributes with supplied taglist. This is the only
  37.     correct way to change the attributes listed below.
  38.  
  39.     The return code from rtChangeReqAttrA() should be ignored unless
  40.     stated otherwise.
  41.  
  42.     Don't pass the tags listed below to the requester itself (unless
  43.     documented otherwise). They will not be recognized.
  44.    
  45.     INPUTS
  46.     req     - pointer to requester.
  47.     taglist - pointer to array of tags.
  48.  
  49.     TAGS
  50.     For the file requester:
  51.  
  52.     RTFI_Dir - (char *)
  53.         Name of new directory to position file requester in. The
  54.         requester's buffer will be deallocated.
  55.  
  56.     RTFI_MatchPat - (char *) New pattern string to match files on.
  57.  
  58.     RTFI_AddEntry - (BPTR) THIS *MUST* BE THE LAST TAGĀ (just before
  59.         TAG_END)! Tagdata must hold a lock on a file or directory you
  60.         want to add to the file requester's buffer. The lock should
  61.         have been obtained using Lock(), and you must unlock this lock
  62.         yourself. It is your responsibility to make sure the file or
  63.         directory is indeed in the directory the file requester is in.
  64.         If the entry is already in the file requester's buffer it will
  65.         simply be updated.
  66.         It is harmless to use this tag if the requester's buffer is not
  67.         initialized. rtChangeReqAttr() will return a boolean to
  68.         indicate success or failure (out of memory).
  69.  
  70.     RTFI_RemoveEntry - (char *) Name of file or directory you want to
  71.         remove from the file requester's buffer. It is your
  72.         responsibility to make sure the file or directory is indeed in
  73.         the directory the file requester is in.
  74.         It is harmless use this tag if the requester's buffer is not
  75.         initialized.
  76.  
  77.     For the font requester:
  78.  
  79.     RTFO_FontName - (char *) Set the name of the currently selected
  80.         font.
  81.  
  82.     RTFO_FontHeight - (UWORD) Set the fontsize of the currently
  83.         selected font.
  84.  
  85.     RTFO_FontStyle - (UBYTE) Set the style of the current font.
  86.  
  87.     RTFO_FontFlags - (UBYTE) Set the flags of the current font.
  88.  
  89.     For the screenmode requester [V38]:
  90.  
  91.     RTSC_ModeFromScreen - (struct Screen *) Screen to get mode
  92.         attributes from.
  93.  
  94.         NOTE: You must make sure the mode this screen is in will be
  95.             accepted by the screen mode requester. Otherwise it will
  96.             automatically cancel. For example, you use
  97.             RTDI_ModeFromScreen on a HAM screen and you haven't set the
  98.             SCREQF_NONSTDMODES flag.
  99.             Note that you must use this tag _before_ the four tags
  100.             below because this tag will set the width, height, depth
  101.             and autoscroll.
  102.  
  103.     RTSC_DisplayID - (ULONG) Set 32-bit mode id of selected mode. The
  104.         width and height will be set to the default (visible) width and
  105.         height, and the depth will be set to maximum. Also read note
  106.         above. Note that you must use this tag _before_ the three tags
  107.         below because this tag will set the width, height and depth to
  108.         default values.
  109.  
  110.     RTSC_DisplayWidth - (UWORD) Set width of display. Must come after
  111.         RTSC_DisplayID or RTSC_ModeFromScreen tags.
  112.  
  113.     RTSC_DisplayHeight - (UWORD) Set height of display. Must come after
  114.         RTSC_DisplayID or RTSC_ModeFromScreen tags.
  115.  
  116.     RTSC_DisplayDepth - (UWORD) Set depth of display. Must come after
  117.         RTSC_DisplayID or RTSC_ModeFromScreen tags.
  118.  
  119.     RTSC_AutoScroll - (BOOL) Boolean state of autoscroll checkbox. Must
  120.         come after RTSC_ModeFromScreen tag.
  121.  
  122.     RTSC_OverscanType - (ULONG) Set type of overscan. Set to 0 for
  123.         regular size, otherwise use OSCAN_... constants. See
  124.         'intuition/screens.[h|i]'.
  125.  
  126.     RESULT
  127.     none (except when RTFI_AddEntry tag is used, see above)
  128.  
  129.     NOTES
  130.  
  131.     EXAMPLE
  132.  
  133.     BUGS
  134.     none known
  135.  
  136.     SEE ALSO
  137.     dos.library/Lock()
  138.  
  139.     INTERNALS
  140.  
  141.     HISTORY
  142.  
  143. ******************************************************************************/
  144. {
  145.     AROS_LIBFUNC_INIT
  146.  
  147.     return ChangeReqAttrA(req, taglist); /* in filereqalloc.c */
  148.     
  149.     AROS_LIBFUNC_EXIT
  150.     
  151. } /* rtChangeReqAttrA */
  152.